package com.sitanyun.merchant.guide.frament.presenter.impl;

import com.sitanyun.merchant.guide.frament.model.impl.MyFModelImpl;
import com.sitanyun.merchant.guide.frament.model.inter.IMyFModel;
import com.sitanyun.merchant.guide.frament.presenter.callback.CallBack;
import com.sitanyun.merchant.guide.frament.presenter.inter.IMyFPresenter;
import com.sitanyun.merchant.guide.frament.view.inter.IMyFView;

public class MyFPresenterImpl implements IMyFPresenter {
    private IMyFView mIMyFView;
    private IMyFModel mIMyFModel;

    public MyFPresenterImpl(IMyFView fIMyFView) {
        mIMyFView = fIMyFView;
        mIMyFModel = new MyFModelImpl();
    }

    @Override
    public void getuser() {
        mIMyFModel.setuser(new CallBack() {
            @Override
            public void onSuccess(Object response) {
                mIMyFView.response(response,IMyFView.RESPONSE_ONE);
            }

            @Override
            public void onError(Throwable t) {
                mIMyFView.response(t,IMyFView.RESPONSE_TWO);
            }
        });
    }
}
